package rmhc.gui
{
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	
	import rmhc.RMHCApp;
	import rmhc.design.BackDesign;
	
	public class BackScreen extends BackDesign
	{
		protected var app:RMHCApp;
		
		public function BackScreen()
		{
			super();
			app = RMHCApp.getApp();
			btnAva.addEventListener(MouseEvent.CLICK , onAvatar );
			btnPost.addEventListener(MouseEvent.CLICK , onPost );
			btnSite.addEventListener(MouseEvent.CLICK , onSite );
		}
		
		protected function onAvatar( e:MouseEvent ):void
		{
			app.showAvatarScreen();
		}
		protected function onPost( e:MouseEvent ):void
		{
			app.showPostScreen();
		}
		protected function onSite( e:MouseEvent ):void
		{
			navigateToURL( new URLRequest( "http://rmhc.ru" ) , "_blank" );
		}
	}
}